package com.jan.activemq01.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.stereotype.Service;

@Service
public class QueueReceiver {
	@Autowired
	private JmsTemplate jmsTemplate;
	public void receive(){
		String msg = (String) jmsTemplate.receiveAndConvert();
		System.out.println("接收到："+msg);
	}
}
